#ifndef __WSL__QUEUE__
#define __WSL__QUEUE__

#define COPY_DATA_TO_QUEUE 0
#define QUEUE_ATOMIC	1
#ifndef uchar 
#define uchar unsigned char
#endif
#ifndef uint
#define uint unsigned int
#endif

#ifndef ushort
#define ushort unsigned short
#endif

#ifndef NULL
#define NULL   0
#endif
typedef struct q_node
{
    unsigned char  *data;
    unsigned short count;
    struct q_node  *next;
}queue_node;


#define QUEUE_ATOMIC_ENTER	
#define QUEUE_ATOMIC_EXIT	


queue_node *	creat_queue_head(void );

unsigned char   queue_clear(queue_node *queue);

char			queue_push(queue_node * queue ,uchar * data,ushort count); 
  
queue_node 		queue_pop(queue_node * queue);
#define         queue_get_item(item , head,index) item = head; \
							 for(int z = 0x00 ; z < index;z++) { \
								 item = item->next; \
								 if(item == NULL) break; } \
									 
								 
#endif
